<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Getting Started: Handling Form Submission</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
    <h1>Form</h1>
    <form action="#" th:action="@{/testPost}" th:object="${user}" method="post">
        <p>Id: <input type="text" th:field="*{id}" /></p>
        <p>姓名: <input type="text" th:field="*{name}" /></p>
       <!--  <p>年龄: <input type="text" th:field="*{age}" /></p> -->
        <p><input type="submit" value="post方式提交" /> <input type="reset" value="Reset" /></p>
    </form>
</body>
</html>